#ifndef DYN_INTERPOLATION_LINEAR_H
#define DYN_INTERPOLATION_LINEAR_H

#include "dyn_interpolation.h"

/*! \author Joey Dumont <joey.dumont@gmail.com>
 *
 *  \date 2012-10-05
 *
 *  \brief Linear piece-wise interpolation.
 *
 * This simple class implements piecewise
 * interpolation.
 */

class LinearInterpolation : public Interpolation
{
public:
    /*! The constructor takes the x and y values to be interpolated.
     * It silently called the Interpolation constructor with 2 interpolation
     * points. */
    LinearInterpolation(colvec _xValues,
                        colvec _yValues)
        : Interpolation(_xValues,_yValues,2){}

    double rawInterpolation(int _index, double x);
};

#endif // DYN_INTERPOLATION_LINEAR_H
